package com.woniuxy.shop.controller;


import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.woniuxy.shop.entity.Product;
import com.woniuxy.shop.service.ProductService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author fanqiwen
 * @since 2023-02-07 11:56:02
 */
@RestController
@RequestMapping("/product")
public class ProductController {
    @Autowired
    ProductService productService;
    @RequestMapping("pageData")
    @ResponseBody
    public  Page<Product> pageData(Integer currentPage, Integer pageSIze,String keywords){
        Page<Product> page = productService.pageData(currentPage, pageSIze,keywords);
        return page;
    }
}

